﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LeMigue.TeamPortal.Base.Biz.Interface;
using LeMigue.TeamPortal.Base.View;
using LeMigue.Scrum.Iterface.Model;

namespace LeMigue.TeamPortal.Dev.Biz
{
    public class DevIterationBiz : IIterationBiz
    {
        private IList<Iteration> _iteracoes = new List<Iteration>();

        public DevIterationBiz()
        {
            _iteracoes.Add(new Iteration(1, "Iteraction 1") { 
                Sprint = new DevSprintBiz().Sprints[0]
            });
        }

        public IList<IterationView> List(Team team, Iteration select)
        {
            return _iteracoes.Select(i => new IterationView(i, select == null ? false : (select.Equals(i)))).ToList();
        }

        public IList<IterationView> List(IList<Iteration> iteracoes, Iteration select)
        {
            return iteracoes.Select(i => new IterationView(i, select == null ? false : (select.Equals(i)))).ToList();
        }
    }
}
